home *** CD-ROM | disk | FTP | other *** search
/ NeXT Education Software Sampler 1992 Fall / NeXT Education Software Sampler 1992 Fall.iso / Mathematics / Notebooks / SigProc2.0 / Packages / SignalProcessing / Analog.m next >
Encoding:
Text File  |  1992-08-18  |  4.6 KB  |  170 lines

  1. (*  :Title:    Initialization for Analog Signal Processing Package  *)
  2.  
  3. (*  :Authors:    Brian Evans, James McClellan  *)
  4.  
  5. (*  :Summary:    This is an initialization file only  *)
  6.  
  7. (*  :Context:    Global`  *)
  8.  
  9. (*  :PackageVersion:  2.74    *)
  10.  
  11. (*
  12.     :Copyright:    Copyright 1989-1992 by Brian L. Evans
  13.         Georgia Tech Research Corporation
  14.  
  15.     Permission to use, copy, modify, and distribute this software
  16.     and its documentation for any purpose and without fee is
  17.     hereby granted, provided that the above copyright notice
  18.     appear in all copies and that both that copyright notice and
  19.     this permission notice appear in supporting documentation,
  20.     and that the name of Georgia Tech or Georgia Institute of
  21.     Technology not be used in advertising or publicity pertaining
  22.     to distribution of the software without specific, written prior
  23.     permission.  Georgia Tech makes no representations about the
  24.     suitability of this software for any purpose.  It is provided
  25.     "as is" without express or implied warranty.
  26.  *)
  27.  
  28. (*  :History:    *)
  29.  
  30. (*  :Keywords:    *)
  31.  
  32. (*  :Source:    *)
  33.  
  34. (*  :Warning:    *)
  35.  
  36. (*  :Mathematica Version:  1.2 or 2.0  *)
  37.  
  38. (*  :Limitation:  *)
  39.  
  40. (*
  41.     :Discussion:    Hierarchy of analog signal processing packages:
  42.  
  43.                        
  44. (d)             ASPAnalyze.m      
  45.             |         |     
  46. (c)            |         Fourier.m       LSolve.m             A
  47.             |         |           |             N
  48.             |        ----+-------------+----             A
  49.             |        |                |             L
  50. (b)            LaPlace.m            InvLaPlace.m         O
  51.             |                |             G
  52.              --------+------------------
  53.                  |
  54. (a)    FilterDesign.m          LSupport.m
  55.           |             |
  56.  
  57.  *)
  58.  
  59.  
  60. (*  B E G I N     I N I T I A L I Z A T I O N  *)
  61.  
  62. (*  Load in those on which the analog sp packages rely  *)
  63.  
  64. Needs[ "SignalProcessing`Support`"]
  65.  
  66.  
  67.  
  68. Which [ 
  69.  
  70.  
  71. (*  Check to make sure that these have not already been loaded in  *)
  72.  
  73. MemberQ[ $ContextPath, "SignalProcessing`Analog`" ],
  74.  
  75.   analog::loaded =
  76.     "Version 2.74 of the analog signal processing packages has \
  77.     already been loaded.",
  78.  
  79.  
  80. (*  For Mathematica 2.0, we only define the stubs  *)
  81.  
  82. TrueQ[ $VersionNumber >= 2.0 ],
  83.  
  84.   Print["Defining stubs for objects in version 2.74 of the \
  85.      analog signal processing packages ..."];
  86.  
  87.   DeclarePackage[ "SignalProcessing`Analog`ASPAnalyze`", { "ASPAnalyze" } ];
  88.  
  89.   DeclarePackage[ "SignalProcessing`Analog`FilterDesign`", { 
  90.             "AnalogFilter", "BesselPolynomial",
  91.             "FilterTransform", "RationalChebyshev" } ];
  92.  
  93.   DeclarePackage[ "SignalProcessing`Analog`Fourier`", { 
  94.             "CTFTData", "CTFTransform", "InvCTFTransform" } ];
  95.  
  96.   DeclarePackage[ "SignalProcessing`Analog`InvLaPlace`", { "InvLaPlace" } ];
  97.  
  98.   DeclarePackage[ "SignalProcessing`Analog`LSolve`", { "LSolve" } ];
  99.  
  100.   DeclarePackage[ "SignalProcessing`Analog`LSupport`", { 
  101.             "InvalidLTransformQ", "InvalidInvLTransformQ",
  102.             "LForm", "LMultiDROC", "LTransformQ", "MakeLObject" } ];
  103.  
  104.   DeclarePackage[ "SignalProcessing`Analog`LaPlace`", { 
  105.             "LaPlace", "LaPlaceTransform" } ];
  106.  
  107.   AppendTo[$ContextPath, "SignalProcessing`Analog`" ];
  108.  
  109.   analog::loaded =
  110.     "Stubs for the routines, objects, and rules for the analog signal \
  111.     processing packages have been loaded successfully.",
  112.  
  113.  
  114.  (*  Load in the packages manually under Mathematica 1.2  *)
  115.  
  116. True,
  117.  
  118.   Print["Loading version 2.74 of the analog signal processing packages ..."];
  119.  
  120.   Needs[ "SignalProcessing`Analog`FilterDesign`" ];        (* level a *)
  121.   Needs[ "SignalProcessing`Analog`LSupport`" ];
  122.  
  123.   Needs[ "SignalProcessing`Analog`LaPlace`" ];            (* level b *)
  124.   Needs[ "SignalProcessing`Analog`InvLaPlace`" ];
  125.  
  126.   Needs[ "SignalProcessing`Analog`Fourier`" ];            (* level c *)
  127.   Needs[ "SignalProcessing`Analog`LSolve`" ];
  128.  
  129.   Needs[ "SignalProcessing`Analog`ASPAnalyze`" ];        (* level d *)
  130.  
  131.   AppendTo[$ContextPath, "SignalProcessing`Analog`" ];
  132.  
  133.   analog::loaded =
  134.     "Routines, objects, and rules for the analog signal \
  135.     processing packages have been loaded successfully."
  136. ]
  137.  
  138.  
  139. (*  Temporary messages  *)
  140.  
  141. analog::error = "The current context should be Global` and it is not."
  142.  
  143. (*  Error checking  *)
  144.  
  145. If [ SameQ[$Context, "Global`"],
  146.      Message[ analog::loaded ],
  147.      Message[ analog::error ] ]
  148.  
  149. (*  Remove temporary messages  *)
  150.  
  151. analog::error = .
  152. analog::loaded = .
  153.  
  154.  
  155. (*  Inform the user about the analog signal processing  *)
  156.  
  157. Print[" "]
  158. Print["Analog signal processing extensions have been defined."]
  159. Print["Good starting points are the objects ASPAnalyze and LaPlace."]
  160. Print["Active packages are maintained in $ContextPath."]
  161. Print["  Evaluate SPsignals for a list of all new signals (functions)." ]
  162. Print["  Evaluate SPoperators for a list of all new operators (systems)." ]
  163. Print["  Evaluate SPfunctions for a list of all new routines." ]
  164. Print["Use SPSimplify to simplify signal processing expressions."]
  165. Print[" "]
  166.  
  167. (*  E N D     I N I T I A L I Z A T I O N  *)
  168.  
  169. Null
  170.